<?php defined('SYSPATH') or die('No direct script access.');
?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head></head>
<body>
<?php
echo Form::open();
echo 'Список адресов (каждый с новой строки)<br>';
echo Form::textarea('urls', $urls, array('rows' => 20, 'cols' => 80)) . '<br>';
echo Form::submit('submit', 'Проверить');
echo Form::close() . '<br>';
echo $checked;
?>
<div id="result">Всего: <span id="all">0</span> День: <span id="day">0</span></div>
<script src="http://a.lidocs.ru/media/js/jquery-1.11.0.min.js"  type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
	$('div.itemcheck').each(function(){
		matches = $(this).children('b').html().match(/;(\d+),.*?;(\d+)/);
		if (matches){
			$('#all').html(parseInt($('#all').html())+parseInt(matches[1]));
			$('#day').html(parseInt($('#day').html())+parseInt(matches[2]));
		}
	});	
});
</script>
</body>
</html>

